package com.ctshk.rpc.iotc.entity;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import java.time.LocalDateTime;
import java.util.List;

import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import com.ctshk.rpc.iotc.req.OperateJson;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * <p>
 * 银联优惠
 * </p>
 *
 * @author 谢诗宏
 * @since 2021-01-22
 */
@Data
@TableName(value = "t_operate_bank_preference",autoResultMap = true)
@ApiModel(value="OperateBankPreference对象", description="银联优惠")
public class OperateBankPreference {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "id")
    private Long id;

    @ApiModelProperty(value = "活动ID")
    private String activityCode;

    @ApiModelProperty(value = "银行ID")
    private Long bankId;

    @ApiModelProperty(value = "银行名称")
    private String bankName;

    @ApiModelProperty(value = "活动总金额")
    private BigDecimal totalAmount;

    @ApiModelProperty(value = "活动名称")
    private String name;

    @ApiModelProperty(value = "活动有效期起始")
    private LocalDateTime activityBegin;

    @ApiModelProperty(value = "活动有效期截至")
    private LocalDateTime activityEnd;

    @ApiModelProperty(value = "活动周期(1:無限制,2:每週)")
    private Integer activityCycle;

    @ApiModelProperty(value = "活动周期星期数据")
    private String activityCycleWeeks;

    @ApiModelProperty(value = "优惠类型(1.满减2.折扣)")
    private Integer discountType;

    @ApiModelProperty(value = "满足X金额")
    private BigDecimal fullAmount;

    @ApiModelProperty(value = "减X金额")
    private BigDecimal reductionAmount;

    @ApiModelProperty(value = "百分比折扣 列 0.1 为 1折")
    private Double discountPercent;

    @ApiModelProperty(value = "优惠封顶")
    private BigDecimal maxDiscount;

    @ApiModelProperty(value = "优惠总名额")
    private Integer totalDiscountQuota;

    @ApiModelProperty(value = "卡号设置")
    private String cardNumbers;

    @ApiModelProperty(value = "优惠说明")
    private String discountExplain;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "业务类型")
    private Integer businessType;

    @TableField(typeHandler = FastjsonTypeHandler.class)
    @ApiModelProperty(value = "适用渠道")
    private List<OperateJson> channelsJson;

    @TableField(typeHandler = FastjsonTypeHandler.class)
    @ApiModelProperty(value = "适用部门")
    private List<OperateJson> departmentsJson;

    @TableField(typeHandler = FastjsonTypeHandler.class)
    @ApiModelProperty(value = "优惠对象")
    private List<OperateJson> discountObjectsJson;

    @ApiModelProperty(value = "推广码状态(0 已撤回 1 未提交 2 审批中 3 审批不通过 4 有效 5暂停  6无效)")
    private Integer status;

    @ApiModelProperty(value = "剩余金额")
    private BigDecimal stockAmount;

    @ApiModelProperty(value = "剩余笔数")
    private Integer stockNum;

    @ApiModelProperty(value = "创建时间")
    private LocalDateTime gmtCreate;

    @ApiModelProperty(value = "创建人")
    private Long createId;

    @ApiModelProperty(value = "更新时间")
    private LocalDateTime gmtModified;

    @ApiModelProperty(value = "修改人")
    private Long modifiedId;

    @ApiModelProperty(value = "删除标识")
    private Integer isDeleted;


}
